package com.jackrain.nea.omslocal.Dao;

import com.jackrain.nea.web.query.QueryEngine;
import org.springframework.stereotype.Component;

/**
 * @ Author     ：nrl
 * @ Date       ：Created in 10:26 2018/8/1
 * @ Description：任务调度数据操作类
 */
@Component
public class CloudTaskDao {
    public int updateCloudTaskStatus(String execstatus,String code,String execMsg,int totalnum,int successnum,long cloudid)
    {
        String sql="update t_omsCloudTaskExec t set t.execstatus=?,t.execcode=?,t.execMsg=?,t.totalnum=?,t.successnum=? where t.cloudid=? and "+execstatus+">=execstatus";
        return QueryEngine.getInstance().executeUpdate(sql, new Object[]{execstatus,code,execMsg,totalnum,successnum,cloudid});
    }
}